package blue.mqtt4j.client;

import blue.mqtt4j.internal.client.impl.DefaultMqttTopic;

/**
 * @author Jin Zheng
 * @since 1.0 2020-11-26
 */
public interface MqttTopic
{
	static MqttTopic from(String topic)
	{
		return new DefaultMqttTopic(topic, MqttMessage.DEFAULT_QOS);
	}

	static MqttTopic from(String topic, MqttQoS qos)
	{
		return new DefaultMqttTopic(topic, qos);
	}

	/**
	 * topic
	 *
	 * @return
	 */
	String topic();

	/**
	 * qos
	 *
	 * @return
	 */
	MqttQoS qos();
}
